#include <iostream>
#include "miniutil/scope.h"
#include "minitest/testcase.h"

using namespace miniutil::util;

class testscope:public testcase
{
public:
	testscope()
	{
	}
	
	virtual void test()
	{
		Scope<int> onescope;
		onescope.addScope(std::make_pair(10, 100));
		onescope.addScope(std::make_pair(0, 22));
		onescope.addScope(std::make_pair(99, 30));
		printscope(onescope);
	}

	template <class TN>
	void printscope(typename Scope<TN> &onescope)
	{
		std::list<Scope<int>::SCOPE_PAIR> curscopes = onescope.getScopes();
		for(std::list<Scope<int>::SCOPE_PAIR>::iterator iter = curscopes.begin();
			iter != curscopes.end(); iter ++)
		{
			std::cout<<iter->first<<":"<<iter->second<<std::endl;
		}
	}

//int main()
//{
//	Scope<int> onescope;
//	onescope.addScope(std::make_pair(10, 100));
//	onescope.addScope(std::make_pair(0, 22));
//	onescope.addScope(std::make_pair(99, 30));
//	printscope(onescope);
//	return 0;
//}
};

testcase * testscope1 = new testscope();
